<div class="form-group">
    <label class="col-sm-2 control-label" for="field-1">名称</label>

    <div class="col-sm-10">
        <input type="text" name="merchant.name" class="form-control" placeholder="请输入商户名称"
               data-validate="required" value="${merchant?.name}">
    </div>
</div>

<div class="form-group-separator"></div>

<div class="form-group">
    <label class="col-sm-2 control-label" for="field-3">商户图片</label>

    <div class="col-sm-10">
        <p style="color: red">注:只能上传4:3分辨率的图片</p>
        <input type="file" class="form-control" name="imagePath" id="imagePath" data-validate="${merchant?.imagePath == null || merchant?.imagePath == '' ? 'required' : ''}">
    </div>
</div>

#{if merchant?.imagePath != null && merchant?.imagePath != ''}
<div class="form-group">
    <label class="col-sm-2 control-label" for="field-3"></label>

    <div class="col-sm-10">
        <img src="${merchant?.imagePath}" style="width: 100px">
    </div>
</div>

#{/if}

<div class="form-group-separator"></div>

<div class="form-group">
    <label class="col-sm-2 control-label" for="field-2">电话</label>

    <div class="col-sm-10">
        <input type="text" name="merchant.servicePhone" class="form-control" placeholder="请输入商户电话"
               data-validate="number" value="${merchant?.servicePhone}">
    </div>
</div>

<div class="form-group-separator"></div>

<div class="form-group">
    <label class="col-sm-2 control-label">微信信息</label>

    <div class="col-sm-10">
        <select class="form-control" name="merchant.weixinData.id" data-validate="required">
            <option value="">请选择微信信息</option>
        #{list weixinDatas,as:'weixinData'}
            <option ${weixinData?.id==merchant?.weixinData?.id?'selected' : ''} value="${weixinData?.id}">${weixinData?.name}</option>
        #{/list}
        </select>
    </div>
</div>

<div class="form-group-separator"></div>

<div class="form-group">
    <label class="col-sm-2 control-label" for="field-5"></label>

    <div class="col-sm-10">
        <button type="submit" class="btn btn-success">&nbsp;&nbsp;确定&nbsp;&nbsp;</button>
        <button type="reset" class="btn btn-white">&nbsp;&nbsp;重置&nbsp;&nbsp;</button>
    </div>

</div>